package com.module.controller;


import com.module.framework.domain.HisLend;
import com.module.framework.domain.NowLend;
import com.module.framework.domain.ResponseResult;
import com.module.framework.dto.HisLendDTO;
import com.module.framework.service.HisLendService;
import com.module.framework.vo.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/hisLend")
public class HistoryController {

    @Autowired
    private HisLendService hisLendService;

    @PostMapping("/list")
    public ResponseResult productList(@RequestBody HisLendDTO hisLendDTO) {
        PageVO pageVO = hisLendService.hisLendList(hisLendDTO);
        return ResponseResult.okResult(pageVO);
    }

    @GetMapping("/info")
    public ResponseResult getBookInfo(Integer id) {
        HisLend hisLend = hisLendService.getHisLendInfo(id);
        return ResponseResult.okResult(hisLend);
    }
}
